﻿using System;
using System.Collections.Generic;
using System.Text;

using YouHP.Utility;
using YouHP.BLL;
using YouHP.Model;
using System.Web;

namespace YouHP.Pages
{
    public class WebLink:BasePage
    {
        HyperLinkBLL hyperLinkBLL = HyperLinkBLL.Instance;
        protected override void ShowPage()
        {
            base.ShowPage();
            if (ErrorCount > 0) return;

            HandleCommon();
            if (ErrorCount > 0) return;

            if (IsPost) HandlePost();
            else HandleGet();

        }
        protected List<HyperLinkInfo> HyperLinkInfoList = new List<HyperLinkInfo>();
        private void HandleCommon()
        {
            this.SetTitle("友情链接");
            this.AddLocation("友情链接", "/Pages/Alpha/WebLink.aspx");
            this.AddLinkCss("/support/alpha/css/WebLink.css");

        }
        private void HandlePost()
        {

        }
        private void HandleGet()
        {
            try
            {
                HyperLinkInfoList = hyperLinkBLL.GetHyperLinkList();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
